/*
 * @Author: your name
 * @Date: 2022-03-17 21:41:57
 * @LastEditTime: 2022-04-13 20:04:00
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \drivingTow\src\user\dto\create-user.dto.ts
 */

import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty } from 'class-validator';

export class CreateUserDto {
  @ApiProperty({ description: '用户名' })
  @IsNotEmpty({message:"请输入用户名"})
  username: string;

  @ApiProperty({ description: '真实姓名' })
  @IsNotEmpty({message:"请输入真实姓名"})
  nickname: string;

  @ApiProperty({ description: '密码' })
  @IsNotEmpty({message:"请输入密码"})
  password: string;

  @ApiProperty({ description: '用户角色' })
  role: string;

  @ApiProperty({ description: '头像' })
  avatar: string;

  @ApiProperty({ description: '电话号码' })
  number: string;

}
export class UserInfoDto {
  public id: number;
  public username: string;
  public nickname: string;
  public avatar: string;
  public number: string;
  public role: string;
  public createTime: Date;
  public updateTime: Date;
}

export interface UsersRo {
  list: UserInfoDto[];
  Total: number;
}

